package com.sdry.service.impl.hpf;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.hpf.FinishProductLibraryMapper;
import com.sdry.model.hpf.FinishProductLibrary;
import com.sdry.service.hpf.FinishProductLibraryService;

/**
 * @ClassName: FinishProductLibraryServiceImpl 
 * @Description:成品库Service实现
 * @Author hpf
 * @Date 2019年1月28日 下午4:11:58 
 * @version 1.0
 */
@Service
public class FinishProductLibraryServiceImpl implements FinishProductLibraryService {

	@Resource
	private FinishProductLibraryMapper finishProductLibraryMapper;
	
	
	/**
	 * 成品库总数
	 * @param finishProductLibrary
	 * @return
	 */
	public Integer countFinishProductLibrary(FinishProductLibrary finishProductLibrary) {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.countFinishProductLibrary(finishProductLibrary);
	}

	/**
	 * 分页查询成品库
	 * @param map
	 * @return
	 */
	public List<FinishProductLibrary> listPageFinishProductLibrary(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.listPageFinishProductLibrary(map);
	}

	/**
	 * 查询所有成品库
	 * @return
	 */
	public List<FinishProductLibrary> listAllFinishProductLibrary() {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.listAllFinishProductLibrary();
	}

	/**
	 * 新增成品库
	 * @param finishProductLibrary 成品库实体
	 * @return
	 */
	public Integer insertFinishProductLibrary(FinishProductLibrary finishProductLibrary) {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.insertFinishProductLibrary(finishProductLibrary);
	}

	/**
	 * 跟新成品库
	 * @param finishProductLibrary 成品库实体
	 * @return
	 */
	public Integer updateFinishProductLibrary(FinishProductLibrary finishProductLibrary) {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.updateFinishProductLibrary(finishProductLibrary);
	}

	/**
	 * 根据产品ID查询成品库
	 * @param pid
	 * @return
	 */
	public FinishProductLibrary findFinishProductLibraryByPid(Long pid) {
		// TODO Auto-generated method stub
		return finishProductLibraryMapper.findFinishProductLibraryByPid(pid);
	}

}
